package org.rcgwt.client.ui.validator.impl;

import org.rcgwt.client.ui.validator.IClientValidatorContext;
import org.rcgwt.client.ui.validator.ISingleton;
import org.rcgwt.client.ui.validator.ITranslator;
import org.rcgwt.client.ui.validator.IValidatorElement;

/**
 * A translator which translate character in lower case format
 * 
 * @author Elian ORIOU
 * 
 */

public class LowerCaseTranslator implements ITranslator, ISingleton {

	private static final LowerCaseTranslator INSTANCE = new LowerCaseTranslator();

	protected LowerCaseTranslator() {
	}

	@Override
	public char translate(IClientValidatorContext context, char ch) {
		return Character.toLowerCase(ch);
	}

	public static IValidatorElement getInstance() {
		return INSTANCE;
	}
}
